using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using Fieldbook.Entities;
using System.Collections.Generic;
using Fieldbook.Business;

namespace Fieldbook.Testwebsite.User
{
    public partial class Messages : FieldbookPage
    {
        protected override void Page_Load(object sender, EventArgs e)
        {
            ReddirectNonActiveSession();
        }

        protected void editButton_Command(object sender, CommandEventArgs e)
        {
            Message message = MessageController.GetMessage(Int64.Parse(e.CommandArgument.ToString()));
            hiddenMessageID.Value = message.Messageid.ToString();
            txtCaption.Text = message.Caption;
            txtContent.Text = message.Content;
            this.EditPanel.Visible = true;
        }
    }
}
